import request from '@/utils/request'

// 登录
export function login(data) {
  return request({
    url: '/sys/user/login',
    method: 'post',
    data
  })
}

// 短信
export function loginCode(data) {
  return request({
    url: `/auth/loginCode?phone=${data.phone}&code=${data.code}&userType=${data.userType}`,
    method: 'post',
    data
  })
}
// 供应商登录
export function supplierLogin(data) {
	return request({
		url: '/supplier/sil/login',
		method: 'post',
		data
	})
}
// 发送验证码
export function sendNoteCode(params) {
  return request({
    url: '/common/sendNoteCode',
    method: 'get',
    params
  })
}
// 修改密码
export function updatePwd(data) {
  return request({
    url: '/system/userInfo/updatePwd',
    method: 'put',
    params: data,
    data
  })
}

// 修改密码供应商
export function updatePwdSupplier(data) {
	return request({
		url: '/supplier/sil/editPassword',
		method: 'put',
		params: data,
		data
	})
}
